<?php

namespace App\Console;

use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

class Kernel extends ConsoleKernel
{
    /**
     * The Artisan commands provided by your application.
     *
     * @var array
     */
    protected $commands = [
        //
    ];

    /**
     * Define the application's command schedule.
     *
     * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
     * @return void
     */
    protected function schedule(Schedule $schedule)
    {
        // 支付记录汇总 计划任务
        $schedule->command('collect:order')->hourlyAt(5);
        $schedule->command('inner-park:collection')->hourlyAt(5);
        $schedule->command('collect:flow')->everyTenMinutes();
        $schedule->command('order:car')->everyMinute();

        $schedule->command('charge:count')->dailyAt('00:00');
        $schedule->command('flow:count')->dailyAt('00:30');
        $schedule->command('flow:month-report')->monthlyOn(1,'00:55');
        $schedule->command('income:count')->dailyAt('00:40');
        $schedule->command('income:month-report')->monthlyOn(1,'00:55');
        $schedule->command('out:count')->monthlyOn(1,'00:23');
        $schedule->command('overnight:day-report')->dailyAt('03:00');
        $schedule->command('charger:day-reporter')->dailyAt('00:55');
        $schedule->command('charge:month-report')->monthlyOn(1,'00:55');
        $schedule->command('invoice:count')->monthlyOn(1,'00:55');
//        $schedule->command('charge:year-report')->yearly(1,'00:55');
        $schedule->command('pbus:taxi')->dailyAt('00:35');
        $schedule->command('bank:excel')->dailyAt('04:20');
        $schedule->command('msg:collect')->everyFiveMinutes();
    }

    /**
     * Register the commands for the application.
     *
     * @return void
     */
    protected function commands()
    {
        $this->load(__DIR__.'/Commands');

        require base_path('routes/console.php');
    }
}
